package com.springboot.springboot03yml.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyController {
    @Value("${spring.datasource.username}")
    private String username;
    @Value("${spring.datasource.password}")
    private String password;
    @Value("${spring.datasource.host}")
    private String host;
    @Value("${spring.datasource.port}")
    private String port;

    public void show()
    {
        System.out.println("username:"+username);
        System.out.println("password:"+password);
        System.out.println("host:"+host);
        System.out.println("port:"+port);
    }
}
